/*
 * @Author: Kevin Zhao
 * @Date: 2021-03-31 20:49:56
 * @LastEditTime: 2021-12-11 18:54:18
 * @LastEditors: Kevin Zhao
 * @Description: 文章相关接口
 * @FilePath: \uniapp-pro\src\api\arc.ts
 */
import request from '../server/request'
 
interface ArticleListInterface {
    itemId?: number | string, // 项目id
    isTop?: boolean // 是否置顶
}

interface ArticleInterface {
    articleId: number | string // 文章id
}

/**
 * @description: 获取所有文章分类信息
 * @param {*}
 * @return {*}
 */
export const getArticleItemListAPI = () => {
    return request({
    }, 'getArticleItemList')
}

/**
 * @description: 获取所有文章列表信息
 * @param {ArticleListInterface} params
 * @return {*}
 */
export const getArticleListAPI = (params: ArticleListInterface) => {
    return request(params, 'getArticleList')
}

/**
 * @description: 获取文章详细信息
 * @param {ArticleInterface} params
 * @return {*}
 */
export const getArticleInfoAPI = (params: ArticleInterface) => {
    return request(params,'getArticleInfo')
}

/**
 * @description: 获取文章浏览次数
 * @param {ArticleInterface} params
 * @return {*}
 */
export const updateArticleViewNumAPI = (params: ArticleInterface) => {
    return request(params,'updateArticleViewNum')
}